<?php
/**
 * Created by PhpStorm.
 * User: phpzh
 * Date: 2020/5/29
 * Time: 14:52
 */

namespace app\common\model;

use think\Model;

class Version extends Base
{
    /***
     * 通过app_type获取最后一条版本内容
     * @param string $appType
     */
    public function getLastVersionAppType($appType = '')
    {
        $data = [
            'status' => 1,
            'app_type' => $appType
        ];
        $order = [
            'id' => 'desc'
        ];
        return $this->where($data)
            ->order($order)
            ->limit(1)
            ->select();

    }
}